<script type="text/javascript">
    $(function()
            {

               
                $('#general').click(function()
                        {
                         $('.children').toggle('slow');
                        }

                );

            }
    );

</script>
<?$current=$this->current;?>
<div class="yui-b">
    <div class="ltWrapper">

        <div class="ltHeader">
        <? if($this->locale == 'en'): ?>
            <a href="#" class="levels selected">Menu</a>
    <? else: ?>
         <a href="#" class="levels selected">Меню</a>
    <? endif; ?>


            <!--<a href="http://www.ixl.com/math/topics" class="topics">Topics</a>-->
        </div>

        <div id="gradesNav" class="leftNav">
            <? $level = 'a'; ?>
            <? foreach ($this->menu as $key=>$menu): ?>

            <div id="level-<?= $level ?>" class="shell">
                <div class="hd ">

                   <? if ($key<>2):?>

                        <a  href="<?= $this->url(array('id' => $menu['id']), 'pages') ?>" >

                        <?else:?>
                          <a href="javascript:void(0)" id="general"  >
                        <?endif;?>
                       <? if ($current==$menu['id']) echo "<span style='color:#E6500E;'>".$menu['title']."</span>";
                         else echo $menu['title'];
                    ?>
                        </a>
                       </div>
            </div>
            <?
            if ($menu['children']) {


               foreach ($menu['children'] as $child)

               {
                    echo "<div id='level-c' class='shell' style='margin-left: 18px;'><div class='children'>";
                   echo "<a href='#' class='link-children' style='text-decoration:none; color: #006060;' >".$child['title']."</a>";
                   echo "</div></div>";
               }

            }
            ?>
            <?$level++ ?>
        
            <? endforeach; ?>


        </div>


    </div>

</div>